/**
 * 
 */
package org.vsg.stock.core.persistence.mybatis;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Vector;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.dao.DataAccessException;
import org.vsg.stock.core.domain.StockCategory;
import org.vsg.stock.core.persistence.StockCategoryDao;

/**
 * @author Bill Vison
 *
 */
public class StockCategoryDaoImpl extends SqlSessionDaoSupport implements
		StockCategoryDao {

	/* (non-Javadoc)
	 * @see org.vsg.common.orm.hibernate.GenericDao#save(java.lang.Object)
	 */
	@Override
	public void save(Object entity) throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.common.orm.hibernate.GenericDao#update(java.lang.Object)
	 */
	@Override
	public void update(Object eneity) throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.common.orm.hibernate.GenericDao#load(java.lang.Class, java.io.Serializable)
	 */
	@Override
	public Object load(Class cls, Serializable pk) throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see org.vsg.common.orm.hibernate.GenericDao#delete(java.lang.Object)
	 */
	@Override
	public void delete(Object entity) throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#saveAll(java.util.Collection)
	 */
	@Override
	public void saveAll(Collection<StockCategory> entities)
			throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#findAllCategory()
	 */
	@Override
	public List<StockCategory> findAllCategory() throws DataAccessException {
		List<StockCategory> cateList = new Vector<StockCategory>();
		cateList = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockCategoryProxy.findAll");

		return (List<StockCategory>)cateList;
	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#findAllDescription()
	 */
	@Override
	public List<String> findAllDescription() throws DataAccessException {
		List<String> descList = new Vector<String>();
		
		descList = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockCategoryProxy.findAllDescription");

		return descList;
	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#findDescriptionByStockCode(java.lang.String)
	 */
	@Override
	public List<String> findDescriptionByStockCode(String stockCode)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#getCategoryByName(java.lang.String)
	 */
	@Override
	public StockCategory getCategoryByName(String name)
			throws DataAccessException {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#cleanAll()
	 */
	@Override
	public void cleanAll() throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#cleanAllAndMapping()
	 */
	@Override
	public void cleanAllAndMapping() throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#updateToStockInfoMapping(java.lang.String, java.lang.String)
	 */
	@Override
	public void updateToStockInfoMapping(String cateDesc, String stockCode)
			throws DataAccessException {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see org.vsg.stock.core.persistence.StockCategoryDao#updateBatchToStockInfoMapping(java.util.Map)
	 */
	@Override
	public void updateBatchToStockInfoMapping(
			Map<String, List<String>> cateStocksMap) throws DataAccessException {
		// TODO Auto-generated method stub

	}

	@Override
	public List<String> findAllStockMapKey() throws DataAccessException {
		// TODO Auto-generated method stub
		List<String> stockMapKeyList = new Vector<String>();
		
		stockMapKeyList = this.getSqlSessionTemplate().selectList("org.vsg.stock.core.domain.mybatis.StockCategoryProxy.findAllMapKeys");

		return stockMapKeyList;
	}

	
	
	
}
